Integrand size = 22, antiderivative size = 134 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\frac {3 c d x}{16 b}+\frac {3 d^2 x^2}{32 b}+\frac {3 d^2 \cos ^2(a+b x)}{32 b^3}+\frac {d^2 \cos ^4(a+b x)}{32 b^3}-\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {3 d (c+d x) \cos (a+b x) \sin (a+b x)}{16 b^2}+\frac {d (c+d x) \cos ^3(a+b x) \sin (a+b x)}{8 b^2} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4490, 3391} \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\frac {d^2 \cos ^4(a+b x)}{32 b^3}+\frac {3 d^2 \cos ^2(a+b x)}{32 b^3}+\frac {d (c+d x) \sin (a+b x) \cos ^3(a+b x)}{8 b^2}+\frac {3 d (c+d x) \sin (a+b x) \cos (a+b x)}{16 b^2}-\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {3 c d x}{16 b}+\frac {3 d^2 x^2}{32 b} \]
[In]
[Out]
Rule 3391
Rule 4490
Rubi steps \begin{align*} \text {integral}& = -\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {d \int (c+d x) \cos ^4(a+b x) \, dx}{2 b} \\ & = \frac {d^2 \cos ^4(a+b x)}{32 b^3}-\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {d (c+d x) \cos ^3(a+b x) \sin (a+b x)}{8 b^2}+\frac {(3 d) \int (c+d x) \cos ^2(a+b x) \, dx}{8 b} \\ & = \frac {3 d^2 \cos ^2(a+b x)}{32 b^3}+\frac {d^2 \cos ^4(a+b x)}{32 b^3}-\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {3 d (c+d x) \cos (a+b x) \sin (a+b x)}{16 b^2}+\frac {d (c+d x) \cos ^3(a+b x) \sin (a+b x)}{8 b^2}+\frac {(3 d) \int (c+d x) \, dx}{16 b} \\ & = \frac {3 c d x}{16 b}+\frac {3 d^2 x^2}{32 b}+\frac {3 d^2 \cos ^2(a+b x)}{32 b^3}+\frac {d^2 \cos ^4(a+b x)}{32 b^3}-\frac {(c+d x)^2 \cos ^4(a+b x)}{4 b}+\frac {3 d (c+d x) \cos (a+b x) \sin (a+b x)}{16 b^2}+\frac {d (c+d x) \cos ^3(a+b x) \sin (a+b x)}{8 b^2} \\ \end{align*}
Time = 0.47 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.66 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\frac {-16 \left (-d^2+2 b^2 (c+d x)^2\right ) \cos (2 (a+b x))+\left (d^2-8 b^2 (c+d x)^2\right ) \cos (4 (a+b x))+4 b d (c+d x) (8 \sin (2 (a+b x))+\sin (4 (a+b x)))}{256 b^3} \]
[In]
[Out]
Time = 1.36 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.81
method | result | size |
parallelrisch | \(\frac {16 \left (-2 \left (d x +c \right )^{2} b^{2}+d^{2}\right ) \cos \left (2 x b +2 a \right )+\left (-8 \left (d x +c \right )^{2} b^{2}+d^{2}\right ) \cos \left (4 x b +4 a \right )+32 b d \left (d x +c \right ) \sin \left (2 x b +2 a \right )+4 d \left (d x +c \right ) b \sin \left (4 x b +4 a \right )+40 b^{2} c^{2}-17 d^{2}}{256 b^{3}}\) | \(109\) |
risch | \(-\frac {\left (8 x^{2} d^{2} b^{2}+16 b^{2} c d x +8 b^{2} c^{2}-d^{2}\right ) \cos \left (4 x b +4 a \right )}{256 b^{3}}+\frac {d \left (d x +c \right ) \sin \left (4 x b +4 a \right )}{64 b^{2}}-\frac {\left (2 x^{2} d^{2} b^{2}+4 b^{2} c d x +2 b^{2} c^{2}-d^{2}\right ) \cos \left (2 x b +2 a \right )}{16 b^{3}}+\frac {d \left (d x +c \right ) \sin \left (2 x b +2 a \right )}{8 b^{2}}\) | \(136\) |
derivativedivides | \(\frac {-\frac {a^{2} d^{2} \cos \left (x b +a \right )^{4}}{4 b^{2}}+\frac {a c d \cos \left (x b +a \right )^{4}}{2 b}-\frac {2 a \,d^{2} \left (-\frac {\left (x b +a \right ) \cos \left (x b +a \right )^{4}}{4}+\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{16}+\frac {3 x b}{32}+\frac {3 a}{32}\right )}{b^{2}}-\frac {c^{2} \cos \left (x b +a \right )^{4}}{4}+\frac {2 c d \left (-\frac {\left (x b +a \right ) \cos \left (x b +a \right )^{4}}{4}+\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{16}+\frac {3 x b}{32}+\frac {3 a}{32}\right )}{b}+\frac {d^{2} \left (-\frac {\left (x b +a \right )^{2} \cos \left (x b +a \right )^{4}}{4}+\frac {\left (x b +a \right ) \left (\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{4}+\frac {3 x b}{8}+\frac {3 a}{8}\right )}{2}-\frac {3 \left (x b +a \right )^{2}}{32}+\frac {\left (2 \cos \left (x b +a \right )^{2}+3\right )^{2}}{128}\right )}{b^{2}}}{b}\) | \(256\) |
default | \(\frac {-\frac {a^{2} d^{2} \cos \left (x b +a \right )^{4}}{4 b^{2}}+\frac {a c d \cos \left (x b +a \right )^{4}}{2 b}-\frac {2 a \,d^{2} \left (-\frac {\left (x b +a \right ) \cos \left (x b +a \right )^{4}}{4}+\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{16}+\frac {3 x b}{32}+\frac {3 a}{32}\right )}{b^{2}}-\frac {c^{2} \cos \left (x b +a \right )^{4}}{4}+\frac {2 c d \left (-\frac {\left (x b +a \right ) \cos \left (x b +a \right )^{4}}{4}+\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{16}+\frac {3 x b}{32}+\frac {3 a}{32}\right )}{b}+\frac {d^{2} \left (-\frac {\left (x b +a \right )^{2} \cos \left (x b +a \right )^{4}}{4}+\frac {\left (x b +a \right ) \left (\frac {\left (\cos \left (x b +a \right )^{3}+\frac {3 \cos \left (x b +a \right )}{2}\right ) \sin \left (x b +a \right )}{4}+\frac {3 x b}{8}+\frac {3 a}{8}\right )}{2}-\frac {3 \left (x b +a \right )^{2}}{32}+\frac {\left (2 \cos \left (x b +a \right )^{2}+3\right )^{2}}{128}\right )}{b^{2}}}{b}\) | \(256\) |
norman | \(\frac {-\frac {5 d^{2} x^{2}}{32 b}-\frac {3 d^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{4 b^{3}}+\frac {\left (16 b^{2} c^{2}-5 d^{2}\right ) \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{8 b^{3}}+\frac {\left (16 b^{2} c^{2}-5 d^{2}\right ) \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{6}}{8 b^{3}}+\frac {5 c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{8 b^{2}}-\frac {3 c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{3}}{8 b^{2}}+\frac {3 c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{5}}{8 b^{2}}-\frac {5 c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{7}}{8 b^{2}}-\frac {5 c d x}{16 b}+\frac {5 d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{8 b^{2}}-\frac {3 d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{3}}{8 b^{2}}+\frac {3 d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{5}}{8 b^{2}}-\frac {5 d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{7}}{8 b^{2}}+\frac {11 d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{8 b}-\frac {15 d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{16 b}+\frac {11 d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{6}}{8 b}-\frac {5 d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{8}}{32 b}+\frac {11 c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{4 b}-\frac {15 c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{8 b}+\frac {11 c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{6}}{4 b}-\frac {5 c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{8}}{16 b}}{\left (1+\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right )^{4}}\) | \(428\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.97 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\frac {3 \, b^{2} d^{2} x^{2} + 6 \, b^{2} c d x - {\left (8 \, b^{2} d^{2} x^{2} + 16 \, b^{2} c d x + 8 \, b^{2} c^{2} - d^{2}\right )} \cos \left (b x + a\right )^{4} + 3 \, d^{2} \cos \left (b x + a\right )^{2} + 2 \, {\left (2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{3} + 3 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{32 \, b^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 320 vs. \(2 (129) = 258\).
Time = 0.43 (sec) , antiderivative size = 320, normalized size of antiderivative = 2.39 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\begin {cases} - \frac {c^{2} \cos ^{4}{\left (a + b x \right )}}{4 b} + \frac {3 c d x \sin ^{4}{\left (a + b x \right )}}{16 b} + \frac {3 c d x \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{8 b} - \frac {5 c d x \cos ^{4}{\left (a + b x \right )}}{16 b} + \frac {3 d^{2} x^{2} \sin ^{4}{\left (a + b x \right )}}{32 b} + \frac {3 d^{2} x^{2} \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{16 b} - \frac {5 d^{2} x^{2} \cos ^{4}{\left (a + b x \right )}}{32 b} + \frac {3 c d \sin ^{3}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{16 b^{2}} + \frac {5 c d \sin {\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{16 b^{2}} + \frac {3 d^{2} x \sin ^{3}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{16 b^{2}} + \frac {5 d^{2} x \sin {\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{16 b^{2}} - \frac {3 d^{2} \sin ^{4}{\left (a + b x \right )}}{64 b^{3}} + \frac {5 d^{2} \cos ^{4}{\left (a + b x \right )}}{64 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \sin {\left (a \right )} \cos ^{3}{\left (a \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 263 vs. \(2 (120) = 240\).
Time = 0.24 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.96 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=-\frac {64 \, c^{2} \cos \left (b x + a\right )^{4} - \frac {128 \, a c d \cos \left (b x + a\right )^{4}}{b} + \frac {64 \, a^{2} d^{2} \cos \left (b x + a\right )^{4}}{b^{2}} + \frac {4 \, {\left (4 \, {\left (b x + a\right )} \cos \left (4 \, b x + 4 \, a\right ) + 16 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (4 \, b x + 4 \, a\right ) - 8 \, \sin \left (2 \, b x + 2 \, a\right )\right )} c d}{b} - \frac {4 \, {\left (4 \, {\left (b x + a\right )} \cos \left (4 \, b x + 4 \, a\right ) + 16 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (4 \, b x + 4 \, a\right ) - 8 \, \sin \left (2 \, b x + 2 \, a\right )\right )} a d^{2}}{b^{2}} + \frac {{\left ({\left (8 \, {\left (b x + a\right )}^{2} - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) + 16 \, {\left (2 \, {\left (b x + a\right )}^{2} - 1\right )} \cos \left (2 \, b x + 2 \, a\right ) - 4 \, {\left (b x + a\right )} \sin \left (4 \, b x + 4 \, a\right ) - 32 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d^{2}}{b^{2}}}{256 \, b} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.08 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=-\frac {{\left (8 \, b^{2} d^{2} x^{2} + 16 \, b^{2} c d x + 8 \, b^{2} c^{2} - d^{2}\right )} \cos \left (4 \, b x + 4 \, a\right )}{256 \, b^{3}} - \frac {{\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} - d^{2}\right )} \cos \left (2 \, b x + 2 \, a\right )}{16 \, b^{3}} + \frac {{\left (b d^{2} x + b c d\right )} \sin \left (4 \, b x + 4 \, a\right )}{64 \, b^{3}} + \frac {{\left (b d^{2} x + b c d\right )} \sin \left (2 \, b x + 2 \, a\right )}{8 \, b^{3}} \]
[In]
[Out]
Time = 23.75 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.51 \[ \int (c+d x)^2 \cos ^3(a+b x) \sin (a+b x) \, dx=\frac {8\,d^2\,\cos \left (2\,a+2\,b\,x\right )+\frac {d^2\,\cos \left (4\,a+4\,b\,x\right )}{2}-16\,b^2\,c^2\,\cos \left (2\,a+2\,b\,x\right )-4\,b^2\,c^2\,\cos \left (4\,a+4\,b\,x\right )+16\,b\,c\,d\,\sin \left (2\,a+2\,b\,x\right )+2\,b\,c\,d\,\sin \left (4\,a+4\,b\,x\right )-16\,b^2\,d^2\,x^2\,\cos \left (2\,a+2\,b\,x\right )-4\,b^2\,d^2\,x^2\,\cos \left (4\,a+4\,b\,x\right )+16\,b\,d^2\,x\,\sin \left (2\,a+2\,b\,x\right )+2\,b\,d^2\,x\,\sin \left (4\,a+4\,b\,x\right )-32\,b^2\,c\,d\,x\,\cos \left (2\,a+2\,b\,x\right )-8\,b^2\,c\,d\,x\,\cos \left (4\,a+4\,b\,x\right )}{128\,b^3} \]
[In]
[Out]